package com.umgsai.thread.thread24;

public class Run {
	public static void main(String[] args) {
		try {
			MyService myService = new MyService();
			MyThread[] array = new MyThread[100];
			for (int i = 0; i < array.length; i++) {
				array[i] = new MyThread(myService);
			}
			for (int i = 0; i < array.length; i++) {
				array[i].start();;
			}
			Thread.sleep(1000);
			System.out.println(myService.atomicLong.get());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
